package jk.spider.core.event.impl;

import java.util.Date;

import jk.spider.core.SpiderController;
import jk.spider.core.event.CoreEvent;
import jk.spider.model.Resource;

public abstract class BaseCoreEventImpl implements CoreEvent {
	protected SpiderController controller;
	protected Resource resource;
	protected String dTime;
	
	public BaseCoreEventImpl(SpiderController controller, Resource resource) {
		this.controller = controller;
		this.resource = resource;
	}
	
	public SpiderController getController() {
		return controller;
	}
	
	public Resource getResource() {
		return resource;
	}
	
	public String getType() {
		return resource.getType();
	}
	
	@SuppressWarnings("deprecation")
	public String getDTime() {
		return new Date().toLocaleString();
	}
}
